<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>innerHTML</title>

    <script type="text/javascript">
    //<![CDATA[
        
        window.onload = function() {
            setTimeout("changeElements()", 3000);
        }

        function changeElements() {
            var elem1 = document.getElementById("elem1");
            var elem2 = document.getElementById("elem2");
            var elem3 = document.getElementById("elem3");

            var tmp = elem1.innerHTML;
            elem1.innerHTML = elem3.innerHTML;
            elem3.innerHTML = elem2.innerHTML;
            elem2.innerHTML = tmp;
        }
    

    //]]>

    </script>
    
</head>
<body>
    <div id="elem1">
        <p>Paragraph text.</p>
    </div>

    <div id="elem2">
        <ul>
            <li>option 1</li>
            <li>option 2</li>
        </ul>
    </div>

    <div id="elem3">
        <p><a href="example9.12.html">Example 9-12</a></p>
    </div>
</body>
</html>
